﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucLogin.ascx.cs" Inherits="ucLogin" %>
<%if (Session["User"] != null)
  {
      var objj = (LoginBL)Session["User"]; %>
<table>
    <tr>
        <td>
            Welcome
            <%=objj.FirstName %>&nbsp;<%=objj.LastName %>
        </td>
        <td>
            <asp:LinkButton ID="lnkLogout" runat="server" OnClick="lnkLogout_Click">Logout</asp:LinkButton>
        </td>
    </tr>
</table>
<%}
  else
  {
%>
<table>
    <tr>
        <td>
            Username
        </td>
        <td>
            <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
        </td>
        <td>
            Password
        </td>
        <td>
            <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
        </td>
        <td>
            <asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="btnLogin_Click" />
        </td>
    </tr>
</table>
<%} %>